using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DTO;
using DAL;
using BUS;
using Utility ;

public partial class Doanhnghiep_trangchu : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    private void LoadData()
    {
        try
        {
            string ma = Session["UserName"].ToString();
            tbDoanhNghiep dn = tbDoanhNghiepBUS.GetByAcc(ma);
            lit_madn.Text = dn.madn.ToString();
            lit_tendn.Text = dn.tendn;
            lit_diachi.Text = dn.diachi;
            lit_sdt.Text = dn.sdt;
            lit_email.Text = dn.email.ToString();
            lit_matkhau.Text = dn.matkhau.ToString();
            lit_taikhoan.Text = dn.taikhoan.ToString();
            HyperLink1.NavigateUrl = "~/DoanhNghiep/SanPham_DN.aspx?id=" + dn.madn.ToString();
            HyperLink3.NavigateUrl = "~/DoanhNghiep/CapNhat_DN.aspx?id=" + dn.madn.ToString();
            hyp_thongke.NavigateUrl = "~/DoanhNghiep/ThongKe_DN.aspx?id=" + dn.madn.ToString();
        }
        catch { }
        
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/DoanhNghiep/dangnhap.aspx");
        Session["UserName"] = "";
    }
}
